package com.csu.tour.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.csu.tour.entity.PerformanceGroup;
import com.csu.tour.mapper.PerformanceGroupMapper;
import com.csu.tour.service.PerformanceGroupService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class PerformanceGroupServiceImpl extends ServiceImpl<PerformanceGroupMapper,PerformanceGroup> implements PerformanceGroupService {
    @Autowired
    private PerformanceGroupMapper performanceGroupMapper;
    private  QueryWrapper<PerformanceGroup> queryWrapper = new QueryWrapper<>();
    @Override
    public List<PerformanceGroup> findAll() {
        return performanceGroupMapper.selectList(null);
    }

    @Override
    public List<PerformanceGroup> findByDescription(String description) {
        description = "";
        return performanceGroupMapper.selectList(queryWrapper.like("description",description));

    }
}
